package com.changgou.system.exception.code;

import com.changgou.entity.ResultCode;

/**
 * @ClassName SysCode
 * @Auther: Jiang YiLin
 * @Date: 2019/11/16  20:03
 * @Description:
 */
public enum SysCode implements ResultCode {
    INVALID_USERNAME(false,20001,"用户名不存在"),
    INVALID_PASSWORD(false,20002,"用户名或密码不正确");

    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;

    SysCode(boolean success,int code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }
    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
